let Mock = require("mockjs")
//网络延迟 增加用户体验
Mock.setup({
    time:'600'
})
// 拓展mockjs 封装获取电话
Mock.Random.extend({
    phone: function () {
      var phonePrefixs = ['190', '136', '150','176'] // 自己写前缀哈
      return this.pick(phonePrefixs) + Mock.mock(/\d{8}/) //Number()
    }
})
//获取今日推荐卡片内容
Mock.mock('/card/list', {
    "userList|6":[{ //生成6个
        "price":'@integer(100,900)',    //随机价格
        'title':'@ctitle(12)',      //随机城市名称
        'imgSrc':''
    }]
})
//获取主页层数内容
Mock.mock('/floor/list',{
    "floorList|4":[{
        "bigIndex":'@integer(0,5)', //随机大图索引
        "price":'@integer(100,900)',   //随机价格
        "smallIndex":"@integer(0,6)",   //随机小图索引
    }]
})